//
//  CALayer+ZHExtension.h
//  KLCategory
//
//  Created by zhusanbao on 2020/10/5.
//

#import <QuartzCore/QuartzCore.h>

NS_ASSUME_NONNULL_BEGIN

@interface CALayer (ZHExtension)
/** type  `fade', `moveIn', `push' and `reveal'. Defaults to `fade'.  subtype: `fromLeft', `fromRight', `fromTop' and
 * `fromBottom'. */
- (void)transitionWithType:(CATransitionType)type subtype:(CATransitionSubtype)subtype;
/** type  `fade', `moveIn', `push' and `reveal'. Defaults to `fade'.  subtype: `fromLeft', `fromRight', `fromTop' and
 * `fromBottom'. */
- (void)transitionWithType:(CATransitionType)type subtype:(CATransitionSubtype)subtype duration:(NSTimeInterval)duration;

- (void)transitionWithType:(CATransitionType)type subtype:(CATransitionSubtype)subtype duration:(NSTimeInterval)duration function:(CAMediaTimingFunctionName)function;

/** fade 动画  */
- (void)fadeAnimationWithDuration:(NSTimeInterval)duration curve:(UIViewAnimationCurve)curve;
/** 移除动画  */
- (void)removeLastFadeAnimation;

- (void)poperPushSpringWithKeyPath:(NSString *)keyPath handle:(void(^)(CASpringAnimation *animate))handle;

@end

NS_ASSUME_NONNULL_END
